<template>
  <div class="register">
    <div class="register_content">
      <!-- 页头 -->
      <el-page-header @back="goBack" content="注册"></el-page-header>
      <div class="register_content_box">
        <aform :ruleForm="ruleForm" @hello="RegisterRule"></aform>
      </div>
    </div>
  </div>
</template>

<script>

import aform from '../../components/form/index.vue'
export default {
  data(){
    return{
      ruleForm: {
        resource: "",
        dname: '',
        qname: "",
        date1: '',
        date2: '',
        address:'',
        username:'',
        phone:'',
        desc:''
      },
    }
  },
   methods:{
    goBack() {
      console.log("go back");
      this.$router.push("/");
    },
    RegisterRule(ruleForm){
      this.ruleForm=ruleForm;
      console.log(ruleForm);
      localStorage.setItem('ruleFrom',JSON.stringify(this.ruleForm));
      this.$router.go(0); 
    }
   },
  components:{
     aform
  }
};
</script>

<style lang="less" scoped>
@import "./index.less";
</style>